package com.easygoods.dao;

import com.easygoods.base.BaseDao;
import com.easygoods.entity.StoreSpu;
import com.easygoods.entityex.GoodsSpuWithEarnRate;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by 许崇雷 on 2019-01-02.
 */
@Repository
public interface StoreSpuDao extends BaseDao<StoreSpu> {
    //该用户是否已经收藏商品
    boolean isStoreSpuExist(@Param("storeId") String storeId);

    //查询 storeId 下 收益率最高的两个 spu
    List<GoodsSpuWithEarnRate> findTopEarnRateSpuList(@Param("storeId") String storeId);
}
